using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Appetite.Domain.Models;

namespace Appetite.Data.EntityFramework
{
    public class AppetiteDomainContext : DbContext
    {
        public AppetiteDomainContext()
            : base("Appetite.Database")
        {

        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

#if(!DEBUG)
            modelBuilder.Conventions.Remove<IncludeMetadataConvention>();
#endif

        }

        public DbSet<Recipe> Recipes { get; set; }
        public DbSet<RecipeCategory> RecipeCategories { get; set; }
    }
}